    <link rel="stylesheet" href="<?= $this->config->item('webroot') ?>styles/requisitions/new_requisition/new_requisition.css" type="text/css" />

	<!-- Page title -->
	<div id="pagetitle">
		<div class="wrapper">
			<h1>Requisitions &rarr; <span>Approval</span></h1>
			<form action="" method="get"><input class="" type="text" id="q" name="q" /></form>
		</div>
	</div>
	<!-- End of Page title -->
	
	<!-- Page content -->
	<div id="page">
    	
		<!-- Wrapper -->
		<div class="wrapper">
			
            <p>&nbsp;</p>	
					
            <div class="leading clearfix">
                <div class="column width2 first">

					<!-- overview box -->
                    <div class="overview content-box corners">
                        <header>
                            <h3><img src="<?= $this->config->item('webroot') ?>images/icons/information.png" alt="" />Requisition #970849</h3>
                        </header>
                        <section>

				<table class="no-style full">
					<tr>
						<td>Requestor:</td>
						<td>Juan Dela Cruz</td>
					</tr>
					<tr>
						<td>Department:</td>
						<td>Liquid Production</td>
					</tr>
					<tr>
						<td>Request Date:</td>
						<td>2 days ago</td>
					</tr>
					<tr>
						<td>Materials Requested:</td>
						<td>3</td>
					</tr>
					<tr>
						<td>Approved by:</td>
						<td>Jane Santos</td>
					</tr>
					<tr>
						<td>Canvassed by:</td>
						<td>Theresa Gonzales</td>
					</tr>

				</table>

				<fieldset>
					<legend>POs to create</legend>
					<table class="no-style full">
						<tr>
							<td>Ace Hardware</td>
							<td>2 materials</td>
						</tr>
						<tr>
							<td>National Bookstore</td>
							<td>2 materials</td>
						</tr>

					</table>
				</fieldset>


				<p>
					
					<a href="<?= $this->config->item('base_url') ?>requisitions/requisitions_purchasing_manager" class="btn"><span class="icon icon-back">&nbsp;</span> Resolve</a>&nbsp;
					<a href="<?= $this->config->item('base_url') ?>requisitions/requisitions_purchasing_manager" class="btn">Save Draft</a><br /><br />
					<a href="<?= $this->config->item('base_url') ?>requisitions/po_printing" class="btn" onclick="if (confirm('Some materials in this requisition (1 box Paper Clips) needs CEO approval. Click OK to send this requisition to CEO.')) { return true; } else { return false; }"><span class="icon icon-ok">&nbsp;</span>Create POs</a>

				</p>
                        </section>
                    </div>
                                        
                </div>
                
                <div class="jobs column width6">
                
					<!-- job box -->
                    <div id="job-box" class="job content-box corners">
                        <header>
                            <h3><img src="<?= $this->config->item('webroot') ?>images/icons/information.png" alt="" />Materials</h3>
                        </header>
                        <section>

				<table class="no-style full">
					<tr>
						<td></td>
						<td></td>
						<td></td>
						<td width="150">
							&nbsp; <a href="#" id="link_approve_all">Approve All</a>&nbsp; &nbsp;
							<a href="#" id="link_reject_all">Reject All</a>
						</td>
					</tr>
					<tr>
						<td><a href="#" class="button-add-material"><span class="icon icon-pencil" title="Edit">&nbsp;</span></a> 1 bottle Chlorine</td>
						<td>Ace Hardware</td>
						<td align="right" style="padding-right:30px;">PHP 500.00</td>
						<td width="150">
							<input id="chk1" class="" value="dmy" name="material1" type="radio">
							<label class="choice" for="chk1">Approve</label>
							<input id="chk2" class="" value="mdy" name="material1" type="radio">
							<label class="choice" for="chk2">Reject</label>
							<div  class="hidden">
								Return to:<br />
								<input type="radio" name="return_to" /> Requestor <br />
								 <input type="radio" name="return_to" /> Canvasser<br />
								<input type="text" value="Remarks" onclick="this.value=''" />
							</div>
						</td>
					</tr>
					<tr>
						<td><a href="#" class="button-add-material"><span class="icon icon-pencil" title="Edit">&nbsp;</span></a> 5 reams bond paper</td>
						<td>National Bookstore</td>
						<td align="right" style="padding-right:30px;">PHP 200.00</td>
						<td width="150">
							<input id="chk3" class="" value="dmy" name="material2" type="radio">
							<label class="choice" for="chk3">Approve</label>
							<input id="chk4" class="" value="mdy" name="material2" type="radio">
							<label class="choice" for="chk4">Reject</label>
							<div  class="hidden">
								Return to:<br />
								<input type="radio" name="return_to" /> Requestor <br />
								 <input type="radio" name="return_to" /> Canvasser<br />
								<input type="text" value="Remarks" onclick="this.value=''" />
							</div>
						</td>
					</tr>
					<tr style="font-weight:bold;">
						<td><a href="#" class="button-add-material"><span class="icon icon-pencil" title="Edit">&nbsp;</span></a> 1 box Paper Clips</td>
						<td>National Bookstore</td>
						<td align="right" style="padding-right:30px;">PHP 50.00</td>
						<td width="150">
							<input id="chk5" class="" value="dmy" name="material3" type="radio">
							<label class="choice" for="chk5">Approve</label>
							<input id="chk6" class="" value="mdy" name="material3" type="radio">
							<label class="choice" for="chk6">Reject</label>
							<div  class="hidden">
								Return to:<br />
								<input type="radio" name="return_to" /> Requestor <br />
								 <input type="radio" name="return_to" /> Canvasser<br />
								<input type="text" value="Remarks" onclick="this.value=''" />
							</div>
						</td>
					</tr>
					<tr>
						<td><a href="#" class="button-add-material"><span class="icon icon-pencil" title="Edit">&nbsp;</span></a> 100 pairs Sandals</td>
						<td>Ace Hardware</td>
						<td align="right" style="padding-right:30px;" id="change_supplier_price">PHP 4,000.00</td>
						<td width="150">
							<input id="chk7" class="" value="dmy" name="material4" type="radio">
							<label class="choice" for="chk7">Approve</label>
							<input id="chk8" class="" value="mdy" name="material4" type="radio">
							<label class="choice" for="chk8">Reject</label>
							<div  class="hidden">
								Return to:<br />
								<input type="radio" name="return_to" /> Requestor <br />
								 <input type="radio" name="return_to" /> Canvasser<br />
								<input type="text" value="Remarks" onclick="this.value=''" />
							</div>
						</td>
					</tr>
					<tr id="table_row_add_new_material" class="hidden">
						<td colspan="2">
							
									
									
							<table class="supplier-list stylized first">
							    <tr style="cursor:pointer;" id="change_supplier_link">
								<td>HYMK Steel</td>
								<td align="right">5,000</td>
							    </tr>
							    <tr id="change_supplier_link_old">
								<td><img src="<?= $this->config->item('webroot') ?>images/icons/star.png" alt="" /> Ace Hardware</td>
								<td align="right">4,000</td>
							    </tr>
							    <tr>
								<td>National Bookstore</td>
								<td align="right">4,100</td>
							    </tr>
							   
							</table>
								    
								
						</td>
					</tr>
				</table>
				
                            
                        </section>
                    </div>
                    
                </div>
                
                

            </div>
									
		</div>
		<!-- End of Wrapper -->
        
	</div>
	<!-- End of Page content -->
    <script type="text/javascript" src="<?= $this->config->item('webroot') ?>scripts/application/requisitions/new_requisition/new_requisition.js"></script>
    <script type="text/javascript">

	$('input[type=radio]').click(function(){
		if ($(this).attr('id')[$(this).attr('id').length-1] % 2 == 0) {
			$(this).parent().find('.hidden').show('fast');
			$(this).parent().parent().find('td').css('color','#D22A2A');
		}
	});

	$('#link_approve_all').click(function(){
		$('input[type=radio]').each(function(){
			if ($(this).attr('id')[$(this).attr('id').length-1] % 2 != 0) {
				$(this).trigger('click');
			}
		});
		return false;
	});

	$('#link_reject_all').click(function(){
		$('input[type=radio]').each(function(){
			if ($(this).attr('id')[$(this).attr('id').length-1] % 2 == 0) {
				$(this).trigger('click');
			}
		});
		return false;
	});

	$('.button-add-material').click(function(){
		$('#table_row_add_new_material').fadeIn('slow');
	});

	$('#change_supplier_link').click(function(){
		if (confirm('Are you sure you want to change the supplier?')) {
			$('#change_supplier_link_old').removeClass('high');
			$('#change_supplier_link_old td:first-child').html('Ace Hardware')
			$('#change_supplier_link td:first-child').html('<img src="<?= $this->config->item('webroot') ?>images/icons/star.png" alt="" /> HYMK Steel');
			$('#change_supplier_price').html('PHP 5,000.00');
			$('#change_supplier_price').parent().find('td:last-child').html('');
		}
	});





    </script>